let lastEvent;

['click', 'touchstart', 'mousedown', 'keydown', 'mouseover'].forEach(eventType => {
  document.addEventListener(eventType,(e)=>{
    lastEvent = e;
  },{
    capture: true, //捕获阶段执行
    passive: true //不阻止默认事件 不会等监听函数执行完再执行默认行为 会直接执行
  })
});

export default function(){
  return lastEvent;
}
